
/**
** \file       free_parser.h
**
** \brief      declaration of the free functions
**
** \authors    Ben M'rad Hanna, Boillot Ulysse, De Oliveira Guillaume,
**             Laterem Hamza and Nguyen Viet Dung
**
** \version    0.8
**
** \date       26 November 2010
**
*/

#ifndef FREE_PARSER_H_
# define FREE_PARSER_H_

# include <stdlib.h>
# include "ast.h"

/**
** \fn         void	free_cmd(s_command	*cmd)
**
** \brief      Frees the node s_cmd
**
** \param      s_command    *cmd
**
** \return     Returns nothing
**
*/

void		free_cmd(s_command		*cmd);

/**
** \fn         void	free_andor(s_andor	*andor)
**
** \brief      Frees the node s_andor
**
** \param      s_andor    *andor
**
** \return     Returns nothing
**
*/

void		free_andor(s_andor		*andor);

/**
** \fn         void	free_ast(s_ast		*ast)
**
** \brief      Frees the node s_ast
**
** \param      s_ast    *ast
**
** \return     Returns nothing
**
*/

void		free_ast(s_ast			*ast);

/**
** \fn         void	free_smp_cmd(s_smp_cmd	*smp_cmd)
**
** \brief      Frees the node s_smp_cmd
**
** \param      s_smp_cmd    *smp_cmd
**
** \return     Returns nothing
**
*/

void		free_smp_cmd(s_smp_cmd		*smp_cmd);

/**
** \fn         void	free_sh_cmd(s_sh_cmd	*sh_cmd)
**
** \brief      Frees the node s_sh_cmd
**
** \param      s_sh_cmd    *sh_cmd
**
** \return     Returns nothing
**
*/

void		free_sh_cmd(s_sh_cmd		*sh_cmd);

/**
** \fn         void	free_ruleif(s_ruleif	*ruleif)
**
** \brief      Frees the node s_ruleif
**
** \param      s_ruleif    *ruleif
**
** \return     Returns nothing
**
*/

void		free_ruleif(s_ruleif		*ruleif);

/**
** \fn         void	free_rulefor(s_rulefor	*rulefor)
**
** \brief      Frees the node s_rulefor
**
** \param      s_rulefor    *rulefor
**
** \return     Returns nothing
**
*/

void		free_rulefor(s_rulefor		*rulefor);

/**
** \fn         void	free_ruleuntil(s_ruleuntil	*ruleuntil)
**
** \brief      Frees the node s_ruleuntil
**
** \param      s_ruleuntil    *ruleuntil
**
** \return     Returns nothing
**
*/

void		free_ruleuntil(s_ruleuntil	*ruleuntil);

/**
** \fn         void	free_rulecase(s_rulecase	*rulecase)
**
** \brief      Frees the node s_rulecase
**
** \param      s_rulecase    *rulecase
**
** \return     Returns nothing
**
*/

void		free_rulecase(s_rulecase	*rulecase);

/**
** \fn         void	free_rulewhile(s_rulewhile	*rulewhile)
**
** \brief      Frees the node s_rulewhile
**
** \param      s_rulewhile    *rulewhile
**
** \return     Returns nothing
**
*/

void		free_rulewhile(s_rulewhile	*rulewhile);

/**
** \fn         void	free_dogroup(s_dogroup	*dogroup)
**
** \brief      Frees the node s_dogroup
**
** \param      s_dogroup    *dogroup
**
** \return     Returns nothing
**
*/

void		free_dogroup(s_dogroup		*dogroup);

/**
** \fn         void	free_caseclause(s_caseclause	*caseclause)
**
** \brief      Frees the node s_caseclause
**
** \param      s_caseclause    *caseclause
**
** \return     Returns nothing
**
*/

void		free_caseclause(s_caseclause	*caseclause);

/**
** \fn         void	free_funcdec(s_funcdec	*funcdec)
**
** \brief      Frees the node s_funcdec
**
** \param      s_funcdec    *funcdec
**
** \return     Returns nothing
**
*/

void		free_funcdec(s_funcdec		*funcdec);

/**
** \fn         void	free_redir(s_redir	*redir)
**
** \brief      Frees the node s_redir
**
** \param      s_redir    *redir
**
** \return     Returns nothing
**
*/

void		free_redir(s_redir		*redir);

/**
** \fn         void	free_cmpdlist(s_cmpdlist	*cmpdlist)
**
** \brief      Frees the node s_cmpdlist
**
** \param      s_cmpdlist    *cmpdlist
**
** \return     Returns nothing
**
*/

void		free_cmpdlist(s_cmpdlist	*clist);

/**
** \fn         void	free_word(s_word	*word)
**
** \brief      Frees the node s_word
**
** \param      s_word    *word
**
** \return     Returns nothing
**
*/

void            free_word(s_word                *word);

#endif /* !FREE_PARSER_H_ */
